From: Jan Beulich Date: Tue, 25 Nov 2014 09:05:29 +0000 (+0100) Subject: x86/cpuidle: don't count C1 multiple times X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4069 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/?a=commitdiff_plain;h=0aabd10525326edfe5098c2ec5bfe05db7732c32;p=xen.git x86/cpuidle: don't count C1 multiple times Commit 4ca6f9f0 ("x86/cpuidle: publish new states only after fully initializing them") resulted in the state counter to be incremented for C1 despite that using a fixed table entry (and the statically initialized counter value already accounting for it and C0). Signed-off-by: Jan Beulich Reviewed-by: Konrad Rzeszutek Wilk Release-Acked-by: Konrad Rzeszutek Wilk --- diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c index f72719c170..2b2bcc6361 100644 --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -1000,7 +1000,7 @@ static void set_cx( cx->target_residency = cx->latency * latency_factor; smp_wmb(); - acpi_power->count++; + acpi_power->count += (cx->type != ACPI_STATE_C1); if ( cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 ) acpi_power->safe_state = cx; }